package com.karson.service.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.karson.common.model.Subtitles;
import com.karson.service.service.SubtitlesService;
import com.karson.service.dao.SubtitlesMapper;
import org.springframework.stereotype.Service;

/**
* @author ZKS
* @description 针对表【ar_subtitles(字幕文件表)】的数据库操作Service实现
* @createDate 2025-08-14 14:36:52
*/
@Service
public class SubtitlesServiceImpl extends ServiceImpl<SubtitlesMapper, Subtitles>
    implements SubtitlesService{

    @Override
    public Subtitles getSubtitleByTrackId(Integer trackId) {
        LambdaQueryWrapper<Subtitles> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Subtitles::getTrackId, trackId);
        Subtitles subTitle = getOne(queryWrapper);
        return subTitle;
    }
}




